//这是控制器中中间件的自动装载
declare var global:any;

export = function middleware (ctx:any,...middname:string[]){
    //解析中间件
    global.gem_Route.config({
        prefix:global.controller[ctx.module.filename].prefix || "",
        //文件级中间件
        middleware:middname || [],
    });
}